﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NetWorkSet
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

        }

        //清理文本框
        private void btnClear_Click(object sender, EventArgs e)
        {
            this.panelControl1.btnClear();
        }

        //保存设置
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("保存之前是否应用？", "提示", MessageBoxButtons.YesNo).ToString() == "Yes")
            {
                this.panelControl1.btnSubmit();//应用设置
            }
            this.panelControl1.btnSave();//保存设置
        }

        //关于
        private void btnCare_Click(object sender, EventArgs e)
        {
            this.panelControl1.btnCare();
        }

        //应用设置
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            this.panelControl1.btnSubmit();//应用设置
            this.panelControl1.btnSave();//保存设置
        }

        //刷新按钮
        private void btnReGet_Click(object sender, EventArgs e)
        {
            this.DataLoad();
        }

        //刷新方法
        public void DataLoad()
        {
            this.panelControl1.DataLoad();//调用
        }

        //获取当前TAB的TEXT值
        public string GetTabTEXT()
        {
            return this.panelControl1.GetTabTEXT();
        }

        //获取当前TAB的TEXT值
        public string GetTabName()
        {
            return this.panelControl1.GetTabName();
        }

        //修改当前TAB的TEXT值
        public string SetTabName(string TabName)
        {
            return this.panelControl1.SetTabName(TabName);
        }

        public void SetLab(int index)
        {
            this.label1.Text = "SET" + (index + 1).ToString();
        }

        public string GetLab()
        {
            return label1.Text;
        }

    }
}
